Skip to main content

MarkdownViewBase<T>

Assembly: ServiceStack.Razor.dll​
View Source​
Declaration
public abstract class MarkdownViewBase<T> : MarkdownViewBase, ITemplatePage

Properties​

Html​

View Source​
Declaration
public HtmlHelper<T> Html { get; }

Inherited Properties​

AppHost​

The AppHost so you can access configuration and resolve dependencies, etc.

View Source​
Declaration
public IAppHost AppHost { get; set; }

Html​

ASP.NET MVC's HtmlHelper

View Source​
Declaration
public HtmlHelper Html { get; protected set; }

MarkdownPage​

This precompiled Markdown page with Metadata

View Source​
Declaration
public MarkdownPage MarkdownPage { get; protected set; }

Model​

The Response DTO

View Source​
Declaration
public object Model { get; protected set; }

RenderHtml​

Whether HTML or Markdown output is requested

View Source​
Declaration
public bool RenderHtml { get; protected set; }

ScopeArgs​

All variables passed to and created by your page. The Response DTO is stored and accessible via the 'Model' variable.

All variables and outputs created are stored in ScopeArgs which is what's available to your website template. The Generated page is stored in the 'Body' variable.

View Source​
Declaration
public Dictionary<string, object> ScopeArgs { get; set; }

ViewEngine​

Reference to MarkdownViewEngine

View Source​
Declaration
public IViewEngine ViewEngine { get; set; }

Methods​

GetHtmlHelper()​

View Source​
Declaration
protected override HtmlHelper GetHtmlHelper()
Returns​

ServiceStack.Html.HtmlHelper

Init(IAppHost, MarkdownPage, Dictionary<String, Object>, Object, Boolean)​

View Source​
Declaration
public override void Init(IAppHost appHost, MarkdownPage markdownPage, Dictionary<string, object> scopeArgs, object model, bool renderHtml)
Parameters​
TypeName
ServiceStack.IAppHostappHost
ServiceStack.Support.Markdown.MarkdownPagemarkdownPage
System.Collections.Generic.Dictionary<System.String,System.Object>scopeArgs
System.Objectmodel
System.BooleanrenderHtml

Inherited Methods​

Combine(String, String[])​

View Source​
Declaration
public string Combine(string separator, params string[] parts)
Returns​

System.String

Parameters​
TypeName
System.Stringseparator
System.String[]parts

Get<T>()​

Resolve registered Assemblies

View Source​
Declaration
public T Get<T>()
Returns​

<T>

Type Parameters​
  • T

GetHtmlHelper()​

Ensure the same instance is used for subclasses

View Source​
Declaration
protected virtual HtmlHelper GetHtmlHelper()
Returns​

ServiceStack.Html.HtmlHelper

Init(IAppHost, MarkdownPage, Dictionary<String, Object>, Object, Boolean)​

View Source​
Declaration
public virtual void Init(IAppHost appHost, MarkdownPage markdownPage, Dictionary<string, object> scopeArgs, object model, bool renderHtml)
Parameters​
TypeName
ServiceStack.IAppHostappHost
ServiceStack.Support.Markdown.MarkdownPagemarkdownPage
System.Collections.Generic.Dictionary<System.String,System.Object>scopeArgs
System.Objectmodel
System.BooleanrenderHtml

InitHelpers()​

Called before page is executed

View Source​
Declaration
public virtual void InitHelpers()

Lower(String)​

View Source​
Declaration
public string Lower(string name)
Returns​

System.String

Parameters​
TypeName
System.Stringname

OnLoad()​

Called after page is executed but before it's merged with the website template if any.

View Source​
Declaration
public virtual void OnLoad()

Partial(String, Object)​

Return the output of a different view with the specified name using the supplied model

View Source​
Declaration
public MvcHtmlString Partial(string viewName, object model)
Returns​

ServiceStack.Html.MvcHtmlString

Parameters​
TypeName
System.StringviewName
System.Objectmodel

Raw(String)​

Don't HTML encode safe output

View Source​
Declaration
public MvcHtmlString Raw(string content)
Returns​

ServiceStack.Html.MvcHtmlString

Parameters​
TypeName
System.Stringcontent

Upper(String)​

View Source​
Declaration
public string Upper(string name)
Returns​

System.String

Parameters​
TypeName
System.Stringname

Implements​